<template>
  <div>
    <!-- <Producted title="冰淇淋" info="今日特价" price="19" buy="快来购买" />
    <Producted title="冰淇淋" info="今日特价" :price="price" buy="快来购买" /> -->
    <Producted v-for="(obj,index) in list" :key="index" 
    :title="obj.proname" :price="obj.proprice" :buy="obj.info" :index="index" @kan="bbkFn"
    />
  </div>
</template>

<script>
import Producted from "./components/Producted.vue";
export default {
  data() {
    return {
      price: 140,
list: [
    { id: 1, proname: "超级好吃的棒棒糖", proprice: 18.8, info: '开业大酬宾, 全场8折' },
    { id: 2, proname: "超级好吃的大鸡腿", proprice: 34.2, info: '好吃不腻, 快来买啊' },
    { id: 3, proname: "超级无敌的冰激凌", proprice: 14.2, info: '炎热的夏天, 来个冰激凌了' },
],
    };
  },
  components: {
    Producted,
  },
  methods:{
      bbkFn(i,price){
          this.list[i].proprice-=price
      }
  }
};
</script>

<style>
</style>